<?php
/*********************************************************************\
* This File is a part of BH-PANEL (Breizh-Heberg Panel v2.1)
* Copyright (C) 2008-2009 the BH Developpers : Vincent Giersch <mail@vincordi.fr>, Cyprien Laleau <fanning.fr@gmail.com> and Edwin Cabiten <marmottes44@hotmail.fr>
* See file AUTHORS to get more informations

* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.

* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.

* You should have received a copy of the GNU General Public License
* along with this program.  If not, see <http://www.gnu.org/licenses/>.
/*********************************************************************/


define('IN', '1');
include('php/lib/common.php');
// ---------------------------------------------------------------------------------------------------------------------------------------------------
if(isset($_GET['page'])) {
	$page = htmlentities(mysql_real_escape_string($_GET['page']));
	$tpl = new gagatemplate(ROOT);
	
	if(is_file('php/'.$page.'.php')) {
		include('php/'.$page.'.php');
	}
	else {
		header("HTTP/1.0 404 Not Found");
		$tpl->parse('404.html');
		
	}
	if($parse == 1) {
		$tps_end = get_microtime();
		$tps = round($tps_end - $tps_start,4);
		$t_sql = round($t_sql,4);
		$tpl->assign(array(
				'sql_requetes' => $nbquery,
				'micro_time' => $tps,
				'micro_sql' => $t_sql,
				'u_auth' => $_SESSION['u_auth'],
				'panel' => $panel,
				'connect' => $connect,
				'title' => $title,
				//'ariane' => ariane($ariane)
		));
		$tpl->parse($tplinc.'.html');
	}

}
deconnexionbdd();
if(isset($soap_session)) {
$soap->logout($soap_session);
}
?>